#ifndef _SPISERVICE_NETWORK_SERVICEINTERFACE_SPIDEV_ISPIDEV_H_
#define _SPISERVICE_NETWORK_SERVICEINTERFACE_SPIDEV_ISPIDEV_H_

#include <iostream>
#include <string>

enum class Spi_Dev_Id : uint8_t
{
    SPI_0_0 = 0x00,
    SPI_1_0 = 0x10,
    SPI_2_0 = 0x20,
    SPI_3_0 = 0x30,
    SPI_Unknown = 0xff,
};

class ISpi_Dev
{
public:
    ISpi_Dev() = default;
    virtual ~ISpi_Dev() = default;

    virtual bool open_dev() = 0;
    virtual bool init_dev(uint32_t speed, uint16_t mode, uint8_t bits, uint16_t delay, bool verbose = false)  = 0;
    virtual void close_dev() = 0;
    virtual bool send_msg() = 0;
    virtual bool recv_msg() = 0;
    virtual bool transfer(uint8_t const *tx, uint8_t const *rx, size_t len) = 0;
    virtual const std::string& node_name() const = 0;
};




#endif